package cn.ccit.servers;

import java.util.List;

import cn.ccit.DAO.CancelDishRecordDAO;
import cn.ccit.DAOImp.CancelDishRecordDAOimp;
import cn.ccit.entites.record.CancelDishRecord;
import cn.ccit.iservers.ICancelDishRecordServers;
import cn.ccit.util.ConstantsUtil;
/**
 * 
 * @类功能说明：  退菜记录服务类
 * @类修改者：  
 * @修改日期：  
 * @修改说明：  
 * @公司名称：ccit 
 * @作者：wanghao  
 * @创建时间：2016年11月5日 上午12:20:25  
 * @版本：V1.0
 */
public class CancelDishRecordServers implements ICancelDishRecordServers {
	private CancelDishRecordDAO cdrDao=null;
	public CancelDishRecordServers() {
		cdrDao=new CancelDishRecordDAOimp();
	}
	@Override
	public boolean addCancelDishRecord(CancelDishRecord cdRecord) {
		cdRecord.setLastModfiyTime(cdRecord.getCreatTime());
		cdRecord.setLastModfiyUid(cdRecord.getCreatUid());
		cdRecord.setLastModfiyUname(cdRecord.getLastModfiyUname());
		return cdrDao.addCancelDishRecord(cdRecord);
	}

	@Override
	public boolean removeCancelDishRecord(CancelDishRecord cdRecord) {
		return cdrDao.removeCancelDishRecord(cdRecord);
	}

	@Override
	public boolean changeCancelDishRecordInfo(CancelDishRecord cdRecord) {
		return cdrDao.changeCancelDishRecordInfo(cdRecord);
	}

	@Override
	public List<CancelDishRecord> getSomeCancelDishRecords(int start, int limit) {
		return cdrDao.getSomeCancelDishRecords(start, limit);
	}

	@Override
	public CancelDishRecord searchCancelDishRecordByID(int id) {
		return cdrDao.searchCancelDishRecordByID(id);
	}

	@Override
	public List<CancelDishRecord> searchCancelDishRecordByYear(String year) {
		return cdrDao.searchCancelDishRecordByYear(year);
	}

	@Override
	public List<CancelDishRecord> searchCancelDishRecordByMonth(String month) {
		return cdrDao.searchCancelDishRecordByMonth(month);
	}

	@Override
	public List<CancelDishRecord> searchCancelDishRecordByDate(String date) {
		return cdrDao.searchCancelDishRecordByDate(date);
	}

}
